package com.lh.entity.table;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@TableName("leader_approval")
public class LeaderApproval {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("rectification_id")
    private Long rectificationId;

    @TableField("rectification_title")
    private String rectificationTitle;

    /**
     * 批示人
     */
    @TableField("approver")
    private String approver;

    @TableField(exist = false)
    private List<String> approvedList;

    @TableField("approved_department")
    private String approvedDepartment;

    @TableField("approved_person")
    private String approvedPerson;

    @TableField("approved_phone")
    private String approvedPhone;

    @TableField("is_viewed")
    private Integer isViewed;

    @TableField("is_send")
    private Integer isSend;

    @TableField("signature_url")
    private String signatureUrl;

    @TableField("photo_url")
    private String photoUrl;

    @TableField("content")
    private String content;

    @TableField("read_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date readTime;

    /**
     * 创建时间
     */
    @TableField("created_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;
}
